package com.dengqi.mymodule.activity.network.activity;

import android.os.Bundle;
import android.view.View;

import com.dengqi.mymodule.R;
import com.dengqi.mymodule.activity.network.bean.MemberBean;
import com.dengqi.mymodule.activity.network.module.MemberContract;
import com.dengqi.mymodule.activity.network.module.MemberPresenter;
import com.module.retrofit.utils.ToastUtil;
import com.trello.rxlifecycle2.components.support.RxAppCompatActivity;

import java.util.List;

/**
 * @Author: dengqi
 * @CreateDate: 2020/10/19 17:25
 * @Description:
 */
public class AddMemberActivity extends RxAppCompatActivity implements MemberContract.MemberLevelListView,
        MemberContract.MemberTagListView, MemberContract.MemberInfoView {

    private MemberPresenter memberPresenter;

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_my_add);

        memberPresenter = new MemberPresenter(this);

        //获取会员等级不显示
        memberPresenter.getMemberLevelList(this, false);
    }

    public void onBtn1(View view){
        //获取会员等级显示
        memberPresenter.getMemberLevelList(this, true);
    }

    public void onBtn2(View view){
        memberPresenter.getMemberTagList(this, true);
    }

    public void onBtn3(View view){
        memberPresenter.addMemberInfo(this);
    }

    public void onBtn4(View view){
    }

    @Override
    public String getBusId() {
        return "1";
    }

    @Override
    public String getShopId() {
        return "1";
    }

    @Override
    public String getPhone() {
        return "13909873647";
    }

    @Override
    public String getName_() {
        return "多尔衮";
    }

    @Override
    public String getSource_() {
        return "2";
    }

    @Override
    public String getLevel() {
        return "";
    }

    @Override
    public String getCardNum() {
        return "";
    }

    @Override
    public String getBirth() {
        return "";
    }

    @Override
    public String getPid() {
        return "";
    }

    @Override
    public String getCid() {
        return "";
    }

    @Override
    public String getDid() {
        return "";
    }

    @Override
    public String getAddress() {
        return "";
    }

    @Override
    public String getRemark() {
        return "";
    }

    @Override
    public String getTag_() {
        return "";
    }

    @Override
    public String getGender() {
        return "";
    }

    @Override
    public void onMemberInfo() {
        ToastUtil.showToast("onMemberInfo");
    }

    @Override
    public void onMemberTagList(List<MemberBean.TagListBean> result) {
        ToastUtil.showToast("onMemberTagList："+result.size());
    }

    @Override
    public void onMemberLevelList(List<MemberBean.LevelListBean> result) {
        ToastUtil.showToast("onMemberLevelList："+result.size());
    }

}
